<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/maa.tld" prefix="m" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${language}"/>
<fmt:bundle basename="messages" prefix="login.">
    <html>
    <head>
        <title><fmt:message key="title"/></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/static/bootstrap/css/bootstrap.css">
        <link href="${pageContext.request.contextPath}/css/login.css" rel="stylesheet">
        <link rel="shortcut icon" href="${pageContext.servletContext.contextPath}/static/yin.ico">
        <script type="text/javascript"
                src="${pageContext.servletContext.contextPath}/static/bootstrap/js/bootstrap.min.js"></script>
        <style type="text/css"></style>
    </head>
    <body>
    <div class="navbar-wrapper">
        <div class="container-fluid">
            <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse"
                                data-target=".navbar-collapse">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="/maa/do?action=main"> <img
                                src="${pageContext.servletContext.contextPath}/static/ics.png"/>Silver Dragon</a>
                    </div>
                    <div class="navbar-collapse collapse">
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="/maa/do?action=main"><fmt:message key="main"/></a></li>
                            <m:language/>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <form class="form-signin" action="/maa/do" method="post">
            <h2 class="form-signin-heading"><fmt:message key="filler"/></h2>
            <c:if test="${not empty no_email}">
                <%=request.getAttribute("no_email")%>
            </c:if>
            <c:if test="${not empty no_password}">
                <%=request.getAttribute("no_password")%>
            </c:if>
            <c:if test="${not empty input_error}">
                <%=request.getAttribute("input_error")%>
            </c:if>
            <input type="text" name="email" class="form-control input-lg" placeholder="<fmt:message key="emph"/>"
            <c:if test="${not empty em}"> value="<%=request.getAttribute("em")%>"
            </c:if> required>
            <input type="password" name="password" class="form-control" placeholder="<fmt:message key="pph"/>"
                   required>
            <button class="btn btn-lg btn-block btn-default" type="submit"><fmt:message key="login"/></button>
            <input type="hidden" name="action" value="login">
        </form>
        <form class="form-signin" action="/maa/do" method="get">
            <button class="btn btn-lg btn-block btn-default" type="submit"><fmt:message key="return"/></button>
            <input type="hidden" name="action" value="main">
        </form>
    </div>
    </body>
    </html>
</fmt:bundle>